<template>
  <tm-app>
    <view class="modal">
      <view class="content">
        <view class="content-title">
          <view class="content-title-img">
            <img class="imgUser" :src="userInfo?.share.avatar?.thumbnail" />
          </view>
        </view>
        <view class="content-item">
          <span class="content-item-name">昵称：</span>
          <view>{{ userInfo?.name }}</view>
        </view>
        <tm-divider />
        <view class="content-item">
          <span class="content-item-name">姓名：</span>
          <view>{{ userInfo?.name }}</view>
        </view>
        <tm-divider />
        <view class="content-item">
          <span class="content-item-name">账户：</span>
          <view>{{ userInfo?.code }}</view>
        </view>
        <tm-divider />
        <view class="content-item">
          <span class="content-item-name">联系方式：</span>
          <view>{{ userInfo?.code }}</view>
        </view>
        <tm-divider />
        <view class="content-remark">
          <span class="content-remark-title">座右铭：</span>
          <view class="content-remark-text">{{ userInfo?.remark }}</view>
        </view>
      </view>
    </view>
  </tm-app>
</template>

<script lang="ts" setup>
import orgCtrl from '@/ts/controller'
import { ref } from 'vue';

const userInfo = ref(orgCtrl.user);
</script>

<style lang="scss" scoped>

.modal {
  // position: fixed;
  // width: 80vw;
  // height: 500upx;
  // top: 50%;
  // left: 50%;
  // transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20upx;
  border-radius: 20upx;
  box-shadow: 0 4upx 16upx rgba(0, 0, 0, 0.15);
  z-index: 1000; /* 设置在蒙层之上 */
  .content {
    .content-title {
      width: 100%;
      height: 360upx;
      display: flex;
      align-items: center;
      justify-content: center;
      .content-title-img {
        // width: 50%;
        .imgUser {
          height: 200upx;
          width: 200upx;
          border-radius: 50%;
          border: 2upx solid #d3d3d3;
        }
      }
      .content-title-type {
        width: 50%;
        display: flex;
        .content-name {
          color: #8d8d8d;
        }
      }
    }
    .content-item {
      width: 100%;
      height: 60upx;
      display: flex;
      align-items: center;
      .content-item-name {
        color: #8d8d8d;
      }
    }
    .content-remark {
      display: flex;
      .content-remark-title {
        color: #8d8d8d;
      }
      .content-remark-text {
        height: 120upx;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        /* 控制显示行数 */
        -webkit-line-clamp: 3;
        flex: 1;
      }
    }
  }
  .close {
    position: absolute;
    bottom: 0upx;
    left: 0upx;
    width: 100%;
    height: 80upx;
    border-top: 2upx solid #d3d3d3;
    box-sizing: border-box;
    margin-top: 20upx;
    font-size: 35upx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .close-cancel {
      color: #000;
      width: 50%;
      border-right: 2upx solid #d3d3d3;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .close-confirm {
      color: #007aff;
      width: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>
